<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Human Interface Device Service</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__ble__sdk__srv__hids.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Human Interface Device Service</div>  </div>
<div class="ingroups"><a class="el" href="group__ble__sdk__srv.html">Bluetooth Services</a></div></div>
<div class="contents">

<p>Human Interface Device Service module.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__char__id__t.html">ble_hids_char_id_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service characteristic id.  <a href="structble__hids__char__id__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__evt__t.html">ble_hids_evt_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service event.  <a href="structble__hids__evt__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__hid__information__t.html">ble_hids_hid_information_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Information characteristic value.  <a href="structble__hids__hid__information__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__inp__rep__init__t.html">ble_hids_inp_rep_init_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service Input Report characteristic init structure. This contains all options and data needed for initialization of one Input Report characteristic.  <a href="structble__hids__inp__rep__init__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__outp__rep__init__t.html">ble_hids_outp_rep_init_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service Output Report characteristic init structure. This contains all options and data needed for initialization of one Output Report characteristic.  <a href="structble__hids__outp__rep__init__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__feature__rep__init__t.html">ble_hids_feature_rep_init_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service Feature Report characteristic init structure. This contains all options and data needed for initialization of one Feature Report characteristic.  <a href="structble__hids__feature__rep__init__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__rep__map__init__t.html">ble_hids_rep_map_init_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service Report Map characteristic init structure. This contains all options and data needed for initialization of the Report Map characteristic.  <a href="structble__hids__rep__map__init__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__rep__char__t.html">ble_hids_rep_char_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Report characteristic structure. This contains various information for initialization of a Report characteristic.  <a href="structble__hids__rep__char__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__init__t.html">ble_hids_init_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service init structure. This contains all options and data needed for initialization of the service.  <a href="structble__hids__init__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hids__s.html">ble_hids_s</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service structure. This contains various status information for the service.  <a href="structble__hids__s.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5b7ffe773161f742ba6e29910981890d"></a><!-- doxytag: member="ble_sdk_srv_hids::BLE_HIDS_REP_TYPE_INPUT" ref="ga5b7ffe773161f742ba6e29910981890d" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HIDS_REP_TYPE_INPUT</b>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadbd5e84eabc19013ac84e71e22f586e1"></a><!-- doxytag: member="ble_sdk_srv_hids::BLE_HIDS_REP_TYPE_OUTPUT" ref="gadbd5e84eabc19013ac84e71e22f586e1" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HIDS_REP_TYPE_OUTPUT</b>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga06b12fed4a77988cacf03a5127550760"></a><!-- doxytag: member="ble_sdk_srv_hids::BLE_HIDS_REP_TYPE_FEATURE" ref="ga06b12fed4a77988cacf03a5127550760" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HIDS_REP_TYPE_FEATURE</b>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga249543ec5d919e70aeecd8099c6cdb74"></a><!-- doxytag: member="ble_sdk_srv_hids::BLE_HIDS_MAX_INPUT_REP" ref="ga249543ec5d919e70aeecd8099c6cdb74" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HIDS_MAX_INPUT_REP</b>&#160;&#160;&#160;10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabd77b82b5dbf2f16066ca128694ab336"></a><!-- doxytag: member="ble_sdk_srv_hids::BLE_HIDS_MAX_OUTPUT_REP" ref="gabd77b82b5dbf2f16066ca128694ab336" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HIDS_MAX_OUTPUT_REP</b>&#160;&#160;&#160;10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6d9fe2bb0fe4c0be6c149660c7df59cb"></a><!-- doxytag: member="ble_sdk_srv_hids::BLE_HIDS_MAX_FEATURE_REP" ref="ga6d9fe2bb0fe4c0be6c149660c7df59cb" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HIDS_MAX_FEATURE_REP</b>&#160;&#160;&#160;10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6b781175a5e142d551120baa4b5da258"></a><!-- doxytag: member="ble_sdk_srv_hids::HID_INFO_FLAG_REMOTE_WAKE_MSK" ref="ga6b781175a5e142d551120baa4b5da258" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>HID_INFO_FLAG_REMOTE_WAKE_MSK</b>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga56e4d378a3507942a55f61449b8ab5a6"></a><!-- doxytag: member="ble_sdk_srv_hids::HID_INFO_FLAG_NORMALLY_CONNECTABLE_MSK" ref="ga56e4d378a3507942a55f61449b8ab5a6" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>HID_INFO_FLAG_NORMALLY_CONNECTABLE_MSK</b>&#160;&#160;&#160;0x02</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7038aff3f095043b34e0a1403dd4ebcc"></a><!-- doxytag: member="ble_sdk_srv_hids::ble_hids_t" ref="ga7038aff3f095043b34e0a1403dd4ebcc" args="" -->
typedef struct <a class="el" href="structble__hids__s.html">ble_hids_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service structure. This contains various status information for the service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6311e0f98c60c31fd17b201162dc6427"></a><!-- doxytag: member="ble_sdk_srv_hids::ble_hids_evt_handler_t" ref="ga6311e0f98c60c31fd17b201162dc6427" args=")(ble_hids_t *p_hids, ble_hids_evt_t *p_evt)" -->
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#ga6311e0f98c60c31fd17b201162dc6427">ble_hids_evt_handler_t</a> )(<a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *p_hids, <a class="el" href="structble__hids__evt__t.html">ble_hids_evt_t</a> *p_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service event handler type. <br/></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#ga621d899fc96687c922a0c65010bfc063">ble_hids_evt_type_t</a> { <br/>
&#160;&#160;<a class="el" href="group__ble__sdk__srv__hids.html#gga621d899fc96687c922a0c65010bfc063a2c517f6d4a3a253bd99b52cc67f34a8b">BLE_HIDS_EVT_HOST_SUSP</a>, 
<a class="el" href="group__ble__sdk__srv__hids.html#gga621d899fc96687c922a0c65010bfc063a6971e1a18ee6ee48d3aa2e046debba6b">BLE_HIDS_EVT_HOST_EXIT_SUSP</a>, 
<a class="el" href="group__ble__sdk__srv__hids.html#gga621d899fc96687c922a0c65010bfc063a65b1e55409e2bed5a0871ec15dff4875">BLE_HIDS_EVT_NOTIF_ENABLED</a>, 
<a class="el" href="group__ble__sdk__srv__hids.html#gga621d899fc96687c922a0c65010bfc063a71b3af5b42cc730e6ad0752b3ad5c581">BLE_HIDS_EVT_NOTIF_DISABLED</a>, 
<br/>
&#160;&#160;<a class="el" href="group__ble__sdk__srv__hids.html#gga621d899fc96687c922a0c65010bfc063a0afaaafa6865acd5725096b6c2f6faa6">BLE_HIDS_EVT_REP_CHAR_WRITE</a>, 
<a class="el" href="group__ble__sdk__srv__hids.html#gga621d899fc96687c922a0c65010bfc063a4bc01306b5a8d12443926c1761d49a3a">BLE_HIDS_EVT_BOOT_MODE_ENTERED</a>, 
<a class="el" href="group__ble__sdk__srv__hids.html#gga621d899fc96687c922a0c65010bfc063a42845071ff0875e098bd16723d57d72f">BLE_HIDS_EVT_REPORT_MODE_ENTERED</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service event type.  <a href="group__ble__sdk__srv__hids.html#ga621d899fc96687c922a0c65010bfc063">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#gaf0b5ac4400c5c10be0a32554a6ffb68a">ble_hids_init</a> (<a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *p_hids, const <a class="el" href="structble__hids__init__t.html">ble_hids_init_t</a> *p_hids_init)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the HID Service.  <a href="#gaf0b5ac4400c5c10be0a32554a6ffb68a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#ga77b3d388f18004a1e730b4f2bbee5cac">ble_hids_on_ble_evt</a> (<a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *p_hids, <a class="el" href="structble__evt__t.html">ble_evt_t</a> *p_ble_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID Service BLE stack event handler.  <a href="#ga77b3d388f18004a1e730b4f2bbee5cac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#gaebf0c8621a14c15990aeac30750fb5bc">ble_hids_inp_rep_send</a> (<a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *p_hids, uint8_t rep_index, uint16_t len, uint8_t *p_data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Send Input Report.  <a href="#gaebf0c8621a14c15990aeac30750fb5bc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#ga30a528bd23ffe8ddea07d1960eb4c507">ble_hids_boot_kb_inp_rep_send</a> (<a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *p_hids, uint16_t len, uint8_t *p_data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Send Boot Keyboard Input Report.  <a href="#ga30a528bd23ffe8ddea07d1960eb4c507"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#gafc9114dc1527bfdd5a961c57c35357e3">ble_hids_boot_mouse_inp_rep_send</a> (<a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *p_hids, uint8_t buttons, int8_t x_delta, int8_t y_delta, uint16_t optional_data_len, uint8_t *p_optional_data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Send Boot Mouse Input Report.  <a href="#gafc9114dc1527bfdd5a961c57c35357e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hids.html#ga66e5fb9cefb62e76a88f2cc229c55f70">ble_hids_outp_rep_get</a> (<a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *p_hids, uint8_t rep_index, uint16_t len, uint8_t offset, uint8_t *p_outp_rep)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current value of Output Report from the stack.  <a href="#ga66e5fb9cefb62e76a88f2cc229c55f70"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Human Interface Device Service module. </p>
<p>This module implements the Human Interface Device Service with the corresponding set of characteristics. During initialization it adds the Human Interface Device Service and a set of characteristics as per the Human Interface Device Service specification and the user requirements to the BLE stack database.</p>
<p>If enabled, notification of Input Report characteristics is performed when the application calls the corresponding ble_hids_xx_input_report_send() function.</p>
<p>If an event handler is supplied by the application, the Human Interface Device Service will generate Human Interface Device Service events to the application.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The application must propagate BLE stack events to the Human Interface Device Service module by calling <a class="el" href="group__ble__sdk__srv__hids.html#ga77b3d388f18004a1e730b4f2bbee5cac" title="HID Service BLE stack event handler.">ble_hids_on_ble_evt()</a> from the <a class="el" href="group__ble__stack__handler.html">BLE Stack Event Handler</a> callback. </dd></dl>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga621d899fc96687c922a0c65010bfc063"></a><!-- doxytag: member="ble_hids.h::ble_hids_evt_type_t" ref="ga621d899fc96687c922a0c65010bfc063" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__ble__sdk__srv__hids.html#ga621d899fc96687c922a0c65010bfc063">ble_hids_evt_type_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>HID Service event type. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga621d899fc96687c922a0c65010bfc063a2c517f6d4a3a253bd99b52cc67f34a8b"></a><!-- doxytag: member="BLE_HIDS_EVT_HOST_SUSP" ref="gga621d899fc96687c922a0c65010bfc063a2c517f6d4a3a253bd99b52cc67f34a8b" args="" -->BLE_HIDS_EVT_HOST_SUSP</em>&nbsp;</td><td>
<p>Suspend command received. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga621d899fc96687c922a0c65010bfc063a6971e1a18ee6ee48d3aa2e046debba6b"></a><!-- doxytag: member="BLE_HIDS_EVT_HOST_EXIT_SUSP" ref="gga621d899fc96687c922a0c65010bfc063a6971e1a18ee6ee48d3aa2e046debba6b" args="" -->BLE_HIDS_EVT_HOST_EXIT_SUSP</em>&nbsp;</td><td>
<p>Exit suspend command received. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga621d899fc96687c922a0c65010bfc063a65b1e55409e2bed5a0871ec15dff4875"></a><!-- doxytag: member="BLE_HIDS_EVT_NOTIF_ENABLED" ref="gga621d899fc96687c922a0c65010bfc063a65b1e55409e2bed5a0871ec15dff4875" args="" -->BLE_HIDS_EVT_NOTIF_ENABLED</em>&nbsp;</td><td>
<p>Notification enabled event. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga621d899fc96687c922a0c65010bfc063a71b3af5b42cc730e6ad0752b3ad5c581"></a><!-- doxytag: member="BLE_HIDS_EVT_NOTIF_DISABLED" ref="gga621d899fc96687c922a0c65010bfc063a71b3af5b42cc730e6ad0752b3ad5c581" args="" -->BLE_HIDS_EVT_NOTIF_DISABLED</em>&nbsp;</td><td>
<p>Notification disabled event. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga621d899fc96687c922a0c65010bfc063a0afaaafa6865acd5725096b6c2f6faa6"></a><!-- doxytag: member="BLE_HIDS_EVT_REP_CHAR_WRITE" ref="gga621d899fc96687c922a0c65010bfc063a0afaaafa6865acd5725096b6c2f6faa6" args="" -->BLE_HIDS_EVT_REP_CHAR_WRITE</em>&nbsp;</td><td>
<p>A new value has been written to an Report characteristic. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga621d899fc96687c922a0c65010bfc063a4bc01306b5a8d12443926c1761d49a3a"></a><!-- doxytag: member="BLE_HIDS_EVT_BOOT_MODE_ENTERED" ref="gga621d899fc96687c922a0c65010bfc063a4bc01306b5a8d12443926c1761d49a3a" args="" -->BLE_HIDS_EVT_BOOT_MODE_ENTERED</em>&nbsp;</td><td>
<p>Boot mode entered. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga621d899fc96687c922a0c65010bfc063a42845071ff0875e098bd16723d57d72f"></a><!-- doxytag: member="BLE_HIDS_EVT_REPORT_MODE_ENTERED" ref="gga621d899fc96687c922a0c65010bfc063a42845071ff0875e098bd16723d57d72f" args="" -->BLE_HIDS_EVT_REPORT_MODE_ENTERED</em>&nbsp;</td><td>
<p>Report mode entered. </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="ble__hids_8h_source.html#l00067">67</a> of file <a class="el" href="ble__hids_8h_source.html">ble_hids.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaf0b5ac4400c5c10be0a32554a6ffb68a"></a><!-- doxytag: member="ble_hids.h::ble_hids_init" ref="gaf0b5ac4400c5c10be0a32554a6ffb68a" args="(ble_hids_t *p_hids, const ble_hids_init_t *p_hids_init)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_hids_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *&#160;</td>
          <td class="paramname"><em>p_hids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structble__hids__init__t.html">ble_hids_init_t</a> *&#160;</td>
          <td class="paramname"><em>p_hids_init</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize the HID Service. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_hids</td><td>HID Service structure. This structure will have to be supplied by the application. It will be initialized by this function, and will later be used to identify this particular service instance. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_hids_init</td><td>Information needed to initialize the service. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS on successful initialization of service, otherwise an error code. </dd></dl>

<p>Definition at line <a class="el" href="ble__hids_8c_source.html#l00855">855</a> of file <a class="el" href="ble__hids_8c_source.html">ble_hids.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga77b3d388f18004a1e730b4f2bbee5cac"></a><!-- doxytag: member="ble_hids.h::ble_hids_on_ble_evt" ref="ga77b3d388f18004a1e730b4f2bbee5cac" args="(ble_hids_t *p_hids, ble_evt_t *p_ble_evt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ble_hids_on_ble_evt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *&#160;</td>
          <td class="paramname"><em>p_hids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__evt__t.html">ble_evt_t</a> *&#160;</td>
          <td class="paramname"><em>p_ble_evt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>HID Service BLE stack event handler. </p>
<p>Handles all events from the BLE stack of interest to the HID Service.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_hids</td><td>HID Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ble_evt</td><td>Event received from the BLE stack. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="ble__hids_8c_source.html#l00279">279</a> of file <a class="el" href="ble__hids_8c_source.html">ble_hids.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaebf0c8621a14c15990aeac30750fb5bc"></a><!-- doxytag: member="ble_hids.h::ble_hids_inp_rep_send" ref="gaebf0c8621a14c15990aeac30750fb5bc" args="(ble_hids_t *p_hids, uint8_t rep_index, uint16_t len, uint8_t *p_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_hids_inp_rep_send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *&#160;</td>
          <td class="paramname"><em>p_hids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>rep_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send Input Report. </p>
<p>Sends data on an Input Report characteristic.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_hids</td><td>HID Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rep_index</td><td>Index of the characteristic (corresponding to the index in <a class="el" href="structble__hids__s.html#a713a274bad390986573cebcf8f310fd9">ble_hids_t.inp_rep_array</a> as passed to <a class="el" href="group__ble__sdk__srv__hids.html#gaf0b5ac4400c5c10be0a32554a6ffb68a" title="Initialize the HID Service.">ble_hids_init()</a>). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Length of data to be sent. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to data to be sent. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS on successful sending of input report, otherwise an error code. </dd></dl>

<p>Definition at line <a class="el" href="ble__hids_8c_source.html#l00990">990</a> of file <a class="el" href="ble__hids_8c_source.html">ble_hids.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga30a528bd23ffe8ddea07d1960eb4c507"></a><!-- doxytag: member="ble_hids.h::ble_hids_boot_kb_inp_rep_send" ref="ga30a528bd23ffe8ddea07d1960eb4c507" args="(ble_hids_t *p_hids, uint16_t len, uint8_t *p_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_hids_boot_kb_inp_rep_send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *&#160;</td>
          <td class="paramname"><em>p_hids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send Boot Keyboard Input Report. </p>
<p>Sends data on an Boot Keyboard Input Report characteristic.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_hids</td><td>HID Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Length of data to be sent. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to data to be sent. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS on successful sending of the report, otherwise an error code. </dd></dl>

<p>Definition at line <a class="el" href="ble__hids_8c_source.html#l01034">1034</a> of file <a class="el" href="ble__hids_8c_source.html">ble_hids.c</a>.</p>

</div>
</div>
<a class="anchor" id="gafc9114dc1527bfdd5a961c57c35357e3"></a><!-- doxytag: member="ble_hids.h::ble_hids_boot_mouse_inp_rep_send" ref="gafc9114dc1527bfdd5a961c57c35357e3" args="(ble_hids_t *p_hids, uint8_t buttons, int8_t x_delta, int8_t y_delta, uint16_t optional_data_len, uint8_t *p_optional_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_hids_boot_mouse_inp_rep_send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *&#160;</td>
          <td class="paramname"><em>p_hids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>buttons</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>x_delta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>y_delta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>optional_data_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_optional_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send Boot Mouse Input Report. </p>
<p>Sends data on an Boot Mouse Input Report characteristic.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_hids</td><td>HID Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">buttons</td><td>State of mouse buttons. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">x_delta</td><td>Horizontal movement. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">y_delta</td><td>Vertical movement. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">optional_data_len</td><td>Length of optional part of Boot Mouse Input Report. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_optional_data</td><td>Optional part of Boot Mouse Input Report. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS on successful sending of the report, otherwise an error code. </dd></dl>

<p>Definition at line <a class="el" href="ble__hids_8c_source.html#l01066">1066</a> of file <a class="el" href="ble__hids_8c_source.html">ble_hids.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga66e5fb9cefb62e76a88f2cc229c55f70"></a><!-- doxytag: member="ble_hids.h::ble_hids_outp_rep_get" ref="ga66e5fb9cefb62e76a88f2cc229c55f70" args="(ble_hids_t *p_hids, uint8_t rep_index, uint16_t len, uint8_t offset, uint8_t *p_outp_rep)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_hids_outp_rep_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *&#160;</td>
          <td class="paramname"><em>p_hids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>rep_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_outp_rep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the current value of Output Report from the stack. </p>
<p>Fetches the current value of the output report characteristic from the stack.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_hids</td><td>HID Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rep_index</td><td>Index of the characteristic (corresponding to the index in <a class="el" href="structble__hids__s.html#a58fbf8f51b70c9adefe18987dfe967ce">ble_hids_t.outp_rep_array</a> as passed to <a class="el" href="group__ble__sdk__srv__hids.html#gaf0b5ac4400c5c10be0a32554a6ffb68a" title="Initialize the HID Service.">ble_hids_init()</a>). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Length of output report needed. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>Offset in bytes to read from. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">p_outp_rep</td><td>Pointer to the output report. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS on successful read of the report, otherwise an error code. </dd></dl>

<p>Definition at line <a class="el" href="ble__hids_8c_source.html#l01129">1129</a> of file <a class="el" href="ble__hids_8c_source.html">ble_hids.c</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
